<html><head><title>api.system.DomEventManager</title><link rel="stylesheet" type="text/css" href="../../../styles/main.css"><link rel="stylesheet" type="text/css" href="../../../styles/prettify.css"><script language=JavaScript src="../../../javascript/prettify.js"></script><script language=JavaScript src="../../../javascript/main.js"></script></head><body class="FramedContentPage" onLoad="{NDOnLoad();prettyPrint();}"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.4 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="api.system.DomEventManager"></a>api.<wbr>system.<wbr>DomEventManager</h1><div class=CBody><p>System object resposible to handle events from registered targets.&nbsp; Its main usage is to call target&rsquo;s methods when they are handled.&nbsp; This object self-registers itself as global one with name &lsquo;DomEventManager&rsquo;</p><p>Mainly this is used from the &lt;utils.parser.Template&gt; class to be able to forward any click events to template handler.</p><h4 class=CHeading>usage</h4><blockquote><pre class="prettyprint">var domEventManager = new api.system.DomEventManager();</pre></blockquote><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#api.system.DomEventManager" >api.<wbr>system.<wbr>DomEventManager</a></td><td class=SDescription>System object resposible to handle events from registered targets. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#api.system.DomEventManager.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#api.system.DomEventManager.DomEventManager" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">DomEventManager</a></td><td class=SDescription>when instance of this class is constructed it self-registers as global object.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#api.system.DomEventManager.getGlobalName" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">getGlobalName</a></td><td class=SDescription>returns the global name which was used to register the object as global</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#api.system.DomEventManager.registerListener" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">registerListener</a></td><td class=SDescription>registers target listener with given name. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#api.system.DomEventManager.unregisterListener" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">unregisterListener</a></td><td class=SDescription>unregisteres target listener with given name. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#api.system.DomEventManager.handleOnClick" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">handleOnClick</a></td><td class=SDescription>handles named click invoked upon given target by its name</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="api.system.DomEventManager.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="api.system.DomEventManager.DomEventManager"></a>DomEventManager</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>DomEventManager : function()</td></tr></table></blockquote><p>when instance of this class is constructed it self-registers as global object.</p><p>If the given global instance is already in place error will be thrown.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="api.system.DomEventManager.getGlobalName"></a>getGlobalName</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>getGlobalName : function()</td></tr></table></blockquote><p>returns the global name which was used to register the object as global</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="api.system.DomEventManager.registerListener"></a>registerListener</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>registerListener : function(</td><td class=PParameter nowrap>target,</td></tr><tr><td></td><td class=PParameter nowrap>targetName</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>registers target listener with given name.&nbsp; If such already exists with the same name, target value will overrite it.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="api.system.DomEventManager.unregisterListener"></a>unregisterListener</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>unregisterListener : function(</td><td class=PParameter nowrap>target,</td></tr><tr><td></td><td class=PParameter nowrap>targetName</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>unregisteres target listener with given name. if such does not exits nothing happens.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="api.system.DomEventManager.handleOnClick"></a>handleOnClick</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>handleOnClick : function(</td><td class=PParameter nowrap>handleMethodName,</td></tr><tr><td></td><td class=PParameter nowrap>targetName</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>handles named click invoked upon given target by its name</p></div></div></div>

</div><!--Content-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>DomEventManager : function()</td></tr></table></blockquote>when instance of this class is constructed it self-registers as global object.</div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>getGlobalName : function()</td></tr></table></blockquote>returns the global name which was used to register the object as global</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>registerListener : function(</td><td class=PParameter nowrap>target,</td></tr><tr><td></td><td class=PParameter nowrap>targetName</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>registers target listener with given name. </div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>unregisterListener : function(</td><td class=PParameter nowrap>target,</td></tr><tr><td></td><td class=PParameter nowrap>targetName</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>unregisteres target listener with given name. </div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>handleOnClick : function(</td><td class=PParameter nowrap>handleMethodName,</td></tr><tr><td></td><td class=PParameter nowrap>targetName</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>handles named click invoked upon given target by its name</div></div><!--END_ND_TOOLTIPS-->

<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>